define([],function(){
    var tpl = {};
    tpl.init = function () {
        var html = '';
        html += searchBox();
        return html;
    }
    tpl.init2 = function () {
        var html = '';
        html += searchList();
        return html;
    }
    var searchBox=function (){
        return 	'<script id="searchBox-tpl" type="text/html">'+
            '<div class="modal fade" tabindex="-1" role="dialog" id="myModal">'+
            '<div class="modal-dialog" role="document">'+
            '<div class="modal-content">'+
            '<div class="modal-header">'+
            '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>'+
            '<h4 class="modal-title">{{data}}</h4>'+
            ' </div>'+
            '<div class="modal-body clearfix">'+
            '<div class="col-md-10 col-md-offset-1">'+
            '<form>'+
            '<div class="form-group">'+
            '<div class="input-group">'+
            '<input type="text" class="form-control" id="searchUser" placeholder="请输入姓名/手机号"  autocomplete="off">'+
            '<div class="input-group-addon" id="toSearch"><i class="fa fa-search" aria-hidden="true"></i></div>'+
            '</div>'+
            '</div>'+
            '</form>'+
            '<div class="infoList clearfix">'+
            '<ul id="infoLists"></ul>'+
            '</div>'+
            '</div>'+
            '</div>'+
            '</div>'+
            '</div>'+
            '<script>';
    }
    var searchList = function(){
        return  '<script id="searchList-tpl" type="text/html">' +
            '{{each data as value}}'+
            '<li userId="{{value.patientId}}" phone="{{value.phoneNum}}" birthday= "{{value.birthday}}" pregnancyDay= "{{value.pregnancyDay}}"><span class="userName">{{value.patientName}}</span>&nbsp;&nbsp;'+
            '{{if value.gender=="F"}}' +
            '   <span class="sex">女&nbsp;&nbsp;</span>'+
            '{{else}}'+
            '   <span class="sex">男&nbsp;&nbsp;</span>'+
            '{{/if}}'+
            '<span class="age">&nbsp;&nbsp;{{value.age}}</span>'+
            '</li>'+
            '{{/each}}'+
            '</script>';
    }
    return tpl;
})
